#!/usr/bin/env python
# -*-coding:utf-8-*-
# File    : pags.py
# Date    : 2021-03-31
# Author  : Tom.Lee

from poium import Page, Element


class LoginFrame(Page):
    lw_account_tab = Element(css='span[data-type="tuzhan"]')
    lw_input_user = Element(css='[placeholder="请输入你的登录账户"]')
    lw_input_pw = Element(css='[placeholder="请输入密码"]')
    lw_login_button = Element(css='button.g-btn.login-btn.do-btn')
    reg_err_tip = Element(css='div.login-form span.error-tips')


    def login(self, user, password):
        self.lw_account_tab.click()
        self.lw_input_user.input(user)
        self.lw_input_pw.input(password)
        self.lw_login_button.click()